package ntd.util.modular.data.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import ntd.util.config.common.entity.BaseEntityMybatis;
import ntd.util.config.common.enums.data.EnumDataSourceType;
import ntd.util.util.metadata.NtdField;


import java.time.LocalDateTime;

@EqualsAndHashCode(callSuper = true)
@TableName("data_source")
@Data
@Schema(description = "数据中心 - 数据源管理")
public class DataSourceDo extends BaseEntityMybatis<DataSourceDo> {

    @Schema(description = "所属机构", title = "所属机构")
    @NtdField(type = 6, oneModular = "common", twoModular = "mechanism")
    private String tenantId;
    @Schema(description = "平台商", title = "平台商")
    @NtdField(type = 6, oneModular = "function", twoModular = "platform")
    private String platformId;
    @Schema(description = "数据源类型", title = "数据源类型")
    private EnumDataSourceType enumDataSourceType;
    @Schema(description = "数据源名称", title = "数据源名称")
    private String name;
    @Schema(description = "数据源地址", title = "数据源地址")
    private String linkAddress;
    @Schema(description = "数据源账号", title = "数据源账号")
    private String account;
    @Schema(description = "数据源密码", title = "数据源密码")
    private String password;
    @Schema(description = "购买时间", title = "购买时间")
    private LocalDateTime purchaseTime;
    @Schema(description = "到期时间", title = "到期时间")
    private LocalDateTime expirationTime;
    @Schema(description = "备注信息", title = "备注信息")
    private String remark;

}
